/* TPL START */

<?php foreach ($schema as $name =>$table) { ?>

class <?php echo $GLOBALS["PEA_CLASS_PREFIX"].$name ?> extends entity
{
  
  var $_pk = null;
  var $_rel = null;
  var $_rev = null;
  var $_auto = null;
  var $_uuid = null;
  var $_col = null;

  function __construct($args = null, $pdox = null, $qb = null)
  {

    $this->_pk = <?php echo tpl_string($table["pri"])?>;
    $this->_rel = <?php echo tpl_array($table["rel"]) ?>;
    $this->_rev = <?php echo tpl_array($table["rev"]) ?>;
    $this->_auto = <?php echo tpl_string($table["auto"])?>;
    $this->_uuid = <?php echo tpl_string($table["uuid"])?>;
    $this->_col = <?php echo tpl_array($table["col"])?>;
    $this->_readonly = array("timestamp" => true);
    
    parent::__construct(<?php echo tpl_string($name); ?>, $args, $pdox, $qb);
  }

}

 
<?php } ?>
/* TPL END */ 
